home *** CD-ROM | disk | FTP | other *** search
- ; This code is a modified version of the plot routine in
- ; Thomas Landspurg's ``SuperDark'' modular screen blanker,
- ; adapted to draw on windows, rather than screens.
-
- csect text,0,0,1,2
-
- include "intuition/intuition.i"
- include "graphics/rastport.i"
- include "graphics/gfx.i"
-
- xdef _MultiPlot
-
- YES SET 0 ; So that IFEQ YES assembles the conditional code
- NO SET 1
-
- ORIG SET NO ; Do not use the original, Screen version
- FAST SET YES ; Do not draw color 0, saving a bit more time
-
- _MultiPlot:
- IFEQ FAST
- tst.w d2
- beq.b quit
- ENDC
-
- IFEQ ORIG
- cmp.w sc_Width(a0),d0
- ENDC
- IFNE ORIG
- cmp.w wd_Width(a0),d0
- ENDC
- bcc quit
-
- IFEQ ORIG
- cmp.w sc_Height(a0),d1
- ENDC
- IFNE ORIG
- cmp.w wd_Height(a0),d1
- ENDC
- bcc quit
-
- movem.l d3/d4,-(sp)
-
- IFEQ ORIG
- move.l sc_RastPort+rp_BitMap(a0),a0
- ENDC
- IFNE ORIG
- move.l wd_RPort(a0),a0
- move.l rp_BitMap(a0),a0
- ENDC
- moveq #0,d4
- moveq #0,d3
- move.w bm_BytesPerRow(a0),d4
- move.b bm_Depth(a0),d3
- lea.l bm_Planes(a0),a0
-
- mulu d4,d1
- move.l d0,d4
- lsr #3,d0
- add d0,d1
- not d4
- subq #1,d3
-
- loop move.l (a0)+,a1
- lsr.b #1,d2
- bcc clear
- bset d4,0(a1,d1.l)
- dbra d3,loop
-
- exit movem.l (sp)+,d3/d4
- quit rts
-
- clear bclr d4,0(a1,d1.l)
- dbra d3,loop
- bra exit
-
- IFEQ ORIG
- xdef _MonoPlot
-
- _MonoPlot:
- cmp.w d3,d0
- bcc 1$
- cmp.w d4,d1
- bcc 1$
- mulu d2,d1
- move d0,d2
- lsr #3,d0
- add d0,d1
- not d2
- bset d2,0(a0,d1)
- 1$ rts
- ENDC
-
- end
-